Skip to content

Fix bug that caused error in type inference when returning from if #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

david-pl
Copy link
Contributor

@weinbe58 @Roger-luo I'm still not 100% certain what the issue was, but this fixes #402 .

I think it's because using the frame instead of creating a new one meant it still had the function as node rather than the actual IfElse statement. So we do need to create a new one here. Is that correct?

Please take a look and let me know whether that explanation is correct, I'd like to take this opportunity to learn ;)

@david-pl david-pl requested a review from Roger-luo June 13, 2025 14:01
Copy link
Contributor

github-actions bot commented Jun 13, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-07-23 13:51 UTC

Copy link

codecov bot commented Jun 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Contributor

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
9684 8578 89% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
src/kirin/dialects/scf/absint.py 85% 🟢
TOTAL 85% 🟢

updated for commit: 6406515 by action🐍

@Roger-luo Roger-luo merged commit f7474f2 into main Jul 23, 2025
12 of 13 checks passed
@Roger-luo Roger-luo deleted the david/402-fix-if-return-type-inference branch July 23, 2025 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue during type-inference scf.IfElse with func.return in one body
2 participants